Ext.define('AgentInfoModel', {
    extend: 'Ext.data.Model',
    fields: [
        "Id"
		, "ChineseFullName"   //企业中文名称
		, "AuthorizationID"   //授权ID
		, "Area"   //地区	
        , "AreaCode" // 地区编号	
		, "BankNumber"   //工商注册号
		, "RegisterRoom"   //注册地
		, "Remark"   //备注
		, "Property"   //性质
		, { name: "Scope", type: "int"}   //规模
		, "HomePage"   //主页
		, "HigherUnit"   //上级单位		
		, "WorkPlace"   //办公所在地
		, "CompanyPlace"   //公司所在地
	],
    idProperty: "Id"
});

Ext.define("SHApp.CompanyManage.AgentLinkman.AgentComboBox", {
    extend: "BLBTSystem.CmbData",
    alias: "widget.agentComboBox",
    dataUrl: "api/agentInfoQ?format=json",
    model: "AgentInfoModel",
    matchFieldWidth: false,
    sorters: [{
        property: 'ChineseFullName',
        direction: 'ASC'
    }],
    listConfig: {
        resizable: true,
        width: 300
    },
    minChars: 1,
    valueField: "Id",
    displayField: "ChineseFullName",
    maxLength: 100,
    forceSelection: false,
    initComponent: function () {
        Ext.apply(this);
        this.callParent(arguments);
    }
});